import request from '@/utils/request'

export function fetchCustomList(data) {
  return request({
    url: '/type/list',
    method: 'get',
    params: data
  })
}

export function delCustom(data) {
  return request({
    url: '/type/dels',
    method: 'post',
    data
  })
}

export function saveCustom(data) {
  return request({
    url: '/type/save',
    method: 'post',
    data
  })
}

// 分类
export function fetchCustomCategoryList(data) {
  return request({
    url: '/typeInfo/list',
    method: 'get',
    params: data
  })
}

export function delCustomCategory(data) {
  return request({
    url: '/typeInfo/dels',
    method: 'post',
    data
  })
}

export function saveCustomCategory(data) {
  return request({
    url: '/typeInfo/save',
    method: 'post',
    data
  })
}
